<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');

class Model_admin extends CI_Model {
	
	var $table_name = "admin";
	
	function __construct()
	{
		parent::__construct();
	}
	
	function auth($user = '',$pass = '')
	{
		if($user === '' or $pass === '') return FALSE;
		$row = $this->db->get_where($this->table_name,array('Username' => $user,'Password' => md5($pass)));
		return ($row->num_rows() > 0);
	}
	
	function update($user,$oldpass,$newpass)
	{
		
	}
	
	function insert($user,$pass)
	{
		
	}
	
}
